#include "GlobalData.h"
#include <CglobalVar.h>
#include <QVariantMap>
#include <QDebug>
GlobalData::GlobalData(QObject *parent)
	: QObject(parent)
{}

GlobalData::~GlobalData()
{}

 void GlobalData::setValue(const QString & key, const QVariant & value)
{
	 CglobalVar::getInstance()->setGlobal(key, value);
}

 QVariant GlobalData::getValue(const QString& key)
{
	return  CglobalVar::getInstance()->getGlobal(key);
}

 void GlobalData::dispalyAllValues()
 {
 	QVariantMap map = CglobalVar::getInstance()->getAllGloabl();
	for (auto it = map.begin(); it != map.end(); it++)
	{
		qDebug() << it.key() << it.value();
	}

 }
